/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb;

import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author Ilo
 */
@Stateless
public class NewSessionBean implements NewSessionBeanLocal {
    @EJB
    private NewEntityFacadeLocal newEntityFacade;

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")

    @Override
    public List<NewEntity> findEntity() {
        List<NewEntity> aE = newEntityFacade.findAll();
        return aE;
    }

    @Override
    public void addEntity(String testo) {
        NewEntity e = new NewEntity();
        e.setTesto(testo);
        newEntityFacade.create(e);
    }
    
}
